﻿@model Ch06.Models.Product

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Create</title>
</head>
<body>
    @using (Html.BeginForm()) 
    {
        @Html.AntiForgeryToken()
        
        <div class="form-horizontal">
            <h4>Product</h4>
            <hr />
            @Html.ValidationSummary(true)
    
            <div class="form-group">
                @Html.LabelFor(model => model.ProductName, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.ProductName)
                    @Html.ValidationMessageFor(model => model.ProductName)
                </div>
            </div>
    
            <div class="form-group">
                @Html.LabelFor(model => model.QuantityPerUnit, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.QuantityPerUnit)
                    @Html.ValidationMessageFor(model => model.QuantityPerUnit)
                </div>
            </div>
    
            <div class="form-group">
                @Html.LabelFor(model => model.Discontinued, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Discontinued)
                    @Html.ValidationMessageFor(model => model.Discontinued)
                </div>
            </div>
    
            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="Create" class="btn btn-default" />
                </div>
            </div>
        </div>
    }
    
    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
</body>
</html>
